.class Les/o40;
.super Ljava/io/OutputStream;
.source "Smb2OutputStream.java"


# instance fields
.field private final a:Les/td0;

.field private b:J


# direct methods
.method public constructor <init>(Les/sd0;Ljava/lang/String;J)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    invoke-direct {p0}, Ljava/io/OutputStream;-><init>()V

    const-wide/16 v0, 0x0

    .line 2
    iput-wide v0, p0, Les/o40;->b:J

    .line 3
    :try_start_0
    sget-object v2, Lcom/hierynomus/msdtyp/AccessMask;->GENERIC_WRITE:Lcom/hierynomus/msdtyp/AccessMask;

    invoke-static {v2}, Ljava/util/EnumSet;->of(Ljava/lang/Enum;)Ljava/util/EnumSet;

    move-result-object v2

    sget-object v3, Lcom/hierynomus/smbj/smb2/SMB2CreateDisposition;->FILE_OPEN_IF:Lcom/hierynomus/smbj/smb2/SMB2CreateDisposition;

    invoke-virtual {p1, p2, v2, v3}, Les/sd0;->a(Ljava/lang/String;Ljava/util/EnumSet;Lcom/hierynomus/smbj/smb2/SMB2CreateDisposition;)Les/td0;

    move-result-object p1

    iput-object p1, p0, Les/o40;->a:Les/td0;
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    cmp-long p1, p3, v0

    if-lez p1, :cond_0

    .line 4
    iput-wide p3, p0, Les/o40;->b:J

    :cond_0
    return-void

    .line 5
    :catch_0
    new-instance p1, Ljava/io/IOException;

    invoke-direct {p1}, Ljava/io/IOException;-><init>()V

    throw p1

    :catch_1
    move-exception p1

    .line 6
    throw p1
.end method


# virtual methods
.method public close()V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    :try_start_0
    iget-object v0, p0, Les/o40;->a:Les/td0;

    invoke-virtual {v0}, Les/td0;->a()V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-void

    .line 2
    :catch_0
    new-instance v0, Ljava/io/IOException;

    invoke-direct {v0}, Ljava/io/IOException;-><init>()V

    throw v0

    :catch_1
    move-exception v0

    .line 3
    throw v0
.end method

.method public flush()V
    .locals 0

    return-void
.end method

.method public write(I)V
    .locals 8
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const/4 v0, 0x1

    :try_start_0
    new-array v2, v0, [B

    const/4 v0, 0x0

    int-to-byte p1, p1

    aput-byte p1, v2, v0

    .line 9
    iget-object v1, p0, Les/o40;->a:Les/td0;

    const-wide/16 v3, 0x0

    const/4 v5, 0x1

    iget-wide v6, p0, Les/o40;->b:J

    invoke-virtual/range {v1 .. v7}, Les/td0;->a([BJIJ)J

    move-result-wide v0

    .line 10
    iget-wide v2, p0, Les/o40;->b:J

    add-long/2addr v2, v0

    iput-wide v2, p0, Les/o40;->b:J
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-void

    .line 11
    :catch_0
    new-instance p1, Ljava/io/IOException;

    invoke-direct {p1}, Ljava/io/IOException;-><init>()V

    throw p1

    :catch_1
    move-exception p1

    .line 12
    throw p1
.end method

.method public write([B)V
    .locals 7
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 5
    :try_start_0
    iget-object v0, p0, Les/o40;->a:Les/td0;

    const-wide/16 v2, 0x0

    array-length v4, p1

    iget-wide v5, p0, Les/o40;->b:J

    move-object v1, p1

    invoke-virtual/range {v0 .. v6}, Les/td0;->a([BJIJ)J

    move-result-wide v0

    .line 6
    iget-wide v2, p0, Les/o40;->b:J

    add-long/2addr v2, v0

    iput-wide v2, p0, Les/o40;->b:J
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-void

    .line 7
    :catch_0
    new-instance p1, Ljava/io/IOException;

    invoke-direct {p1}, Ljava/io/IOException;-><init>()V

    throw p1

    :catch_1
    move-exception p1

    .line 8
    throw p1
.end method

.method public write([BII)V
    .locals 7
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    :try_start_0
    iget-object v0, p0, Les/o40;->a:Les/td0;

    int-to-long v2, p2

    iget-wide v5, p0, Les/o40;->b:J

    move-object v1, p1

    move v4, p3

    invoke-virtual/range {v0 .. v6}, Les/td0;->a([BJIJ)J

    move-result-wide p1

    .line 2
    iget-wide v0, p0, Les/o40;->b:J

    add-long/2addr v0, p1

    iput-wide v0, p0, Les/o40;->b:J
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-void

    .line 3
    :catch_0
    new-instance p1, Ljava/io/IOException;

    invoke-direct {p1}, Ljava/io/IOException;-><init>()V

    throw p1

    :catch_1
    move-exception p1

    .line 4
    throw p1
.end method
